/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ucom.Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Simon Hong
 */
@Entity
@Table(name = "worklog")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Worklog.findAll", query = "SELECT w FROM Worklog w"),
    @NamedQuery(name = "Worklog.findByWorklogID", query = "SELECT w FROM Worklog w WHERE w.worklogID = :worklogID")})
public class Worklog implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "WorklogID")
    private Integer worklogID;
    @Lob
    @Size(max = 65535)
    @Column(name = "WorklogDetail")
    private String worklogDetail;

    public Worklog() {
    }

    public Worklog(Integer worklogID) {
        this.worklogID = worklogID;
    }

    public Integer getWorklogID() {
        return worklogID;
    }

    public void setWorklogID(Integer worklogID) {
        this.worklogID = worklogID;
    }

    public String getWorklogDetail() {
        return worklogDetail;
    }

    public void setWorklogDetail(String worklogDetail) {
        this.worklogDetail = worklogDetail;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (worklogID != null ? worklogID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Worklog)) {
            return false;
        }
        Worklog other = (Worklog) object;
        if ((this.worklogID == null && other.worklogID != null) || (this.worklogID != null && !this.worklogID.equals(other.worklogID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ucom.Entity.Worklog[ worklogID=" + worklogID + " ]";
    }
    
}
